import { eventHandler } from 'h3';

export default eventHandler((event) => {
  const { page, pageSize } = getQuery(event);

  return usePageResponseSuccess(
    page as string,
    pageSize as string,
    [
      {
        id: 12,
        createdAt: 1_747_885_967_823,
        updatedAt: 1_747_885_967_823,
        status: 1,
        sort: 1,
        name: '11',
        code: '1',
        remark: '1',
      },
      {
        id: 10,
        createdAt: 1_747_817_462_571,
        updatedAt: 1_747_824_412_766,
        status: 1,
        sort: 1,
        name: '2222222222222',
        code: '+',
        remark: '+',
      },
      {
        id: 3,
        createdAt: 1_746_583_283_138,
        updatedAt: 1_746_596_040_886,
        status: 1,
        sort: 6,
        name: 'CEO1',
        code: '6',
        remark: '6333322222',
      },
      {
        id: 14,
        createdAt: 1_747_885_980_550,
        updatedAt: 1_747_885_980_550,
        status: 1,
        sort: 100,
        name: '999',
        code: '1000',
        remark: null,
      },
    ],
    {
      message: 'ok',
    },
  );
});
